package com.cdm.persistence;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CdmLicensePermission entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cdm_license_permission", catalog = "cdm", uniqueConstraints = {})
public class LicensePermission implements java.io.Serializable {

	// Fields

	private Long permissionId;
	private Long count;
	private Long timedCount;
	private Date timeStart;
	private Date timeEnd;
	private Long freeInterval;
	private Date accumulated = new Date();
	private String individual;
	private String system;
	private Long time;

	// Constructors

	/** default constructor */
	public LicensePermission() {
	}

	/** full constructor */
	public LicensePermission(Long permissionId, Long count, Long timedCount, Date timeStart, Date timeEnd, Long freeInterval,
	        String individual, String system, Long time) {
		this.permissionId = permissionId;
		this.count = count;
		this.timedCount = timedCount;
		this.timeStart = timeStart;
		this.timeEnd = timeEnd;
		this.freeInterval = freeInterval;
		this.individual = individual;
		this.system = system;
		this.time = time;
	}

	// Property accessors
	@Id
	@Column(name = "permission_id", unique = true, nullable = false, insertable = true, updatable = true)
	public Long getPermissionId() {
		return this.permissionId;
	}

	public void setPermissionId(Long permissionId) {
		this.permissionId = permissionId;
	}

	@Column(name = "count", unique = false, nullable = true, insertable = true, updatable = true)
	public Long getCount() {
		return this.count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	@Column(name = "timed_count", unique = false, nullable = true, insertable = true, updatable = true)
	public Long getTimedCount() {
		return this.timedCount;
	}

	public void setTimedCount(Long timedCount) {
		this.timedCount = timedCount;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "time_start", unique = true, nullable = true, insertable = true, updatable = true,length = 19)
	public Date getTimeStart() {
		return this.timeStart;
	}

	public void setTimeStart(Date timeStart) {
		this.timeStart = timeStart;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "time_end", unique = true, nullable = true, insertable = true, updatable = true,length = 19)
	public Date getTimeEnd() {
		return this.timeEnd;
	}

	public void setTimeEnd(Date timeEnd) {
		this.timeEnd = timeEnd;
	}

	@Column(name = "free_interval", unique = false, nullable = true, insertable = true, updatable = true)
	public Long getFreeInterval() {
		return this.freeInterval;
	}

	public void setFreeInterval(Long freeInterval) {
		this.freeInterval = freeInterval;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "accumulated",unique = true, nullable = true, insertable = true, updatable = true, length = 8)
	public Date getAccumulated() {
		return this.accumulated;
	}

	public void setAccumulated(Date accumulated) {
		this.accumulated = accumulated;
	}

	@Column(name = "individual",unique = true, nullable = true, insertable = true, updatable = true, length = 2000)
	public String getIndividual() {
		return this.individual;
	}

	public void setIndividual(String individual) {
		this.individual = individual;
	}

	@Column(name = "system",unique = true, nullable = true, insertable = true, updatable = true, length = 2000)
	public String getSystem() {
		return this.system;
	}

	public void setSystem(String system) {
		this.system = system;
	}

	@Column(name = "time",unique = true, nullable = true, insertable = true, updatable = true)
	public Long getTime() {
		return this.time;
	}

	public void setTime(Long time) {
		this.time = time;
	}

}